const theme = require('./theme');

let APIV1 = '';
if (process.env.NODE_ENV !== 'production') {
	APIV1 = '/api/v1';
}

const config = {
	name: '青鸟消防生产测试系统',
	appKey: 'sdsddfasdfasdfsdfasfdsf',
	prefix: 'antdAdmin',
	footerText: '青鸟消防生产测试系统 @2018',
	logo: '/logo.png',
	YQL: ['http://www.zuimeitianqi.com'],
	CORS: ['http://localhost:7000'],
	openPages: ['/login'],
	amapKey: '6b60d49623eb68b32080579d10f626d5', // 高德地图key
	apiPrefix: APIV1, // mock当中会引用到
	defaultTheme: theme.theme1,
	maxRequest: 3,
	whitelist: [
		'/sys/sysUser/userDetailInfo',
		'/sys/sysUser/login',
		'/sys/sysUser/messageAuthenticationCode',
		'/sys/sysUser/forgetPassword',
	], // 不需要区分version就可以访问的api
	api: {
		workOrderManualAdd: '/workOrder/manualAdd',
		bindingAccountList: '/agent/bindingAccount',
		operatorBindingAccountList: '/operator/bindingAccount',
		workOrderEdit: '/workOrder/edit',
		cardCouponsCover: '/card/card/cover/upload',
	}// 在表单上传中使用axios上传的时候还用得到
};

Object.keys(config.api).forEach(k => {
	config.api[k] = `${APIV1}${config.api[k]}`;
});

module.exports = config;
